<template>
	<div>
		<view class="Minebox">
			<view class="Mineboxtop">
				<view>
					<view class="settings">
						<text class="iconfont icon-chilun"></text>
					</view>
					<view class="infohint">
						<text class="iconfont icon-xiaoxi"></text>
					</view>
				</view>
				<button type="default" @click="logins" class="logins" v-if="islogin">点击登录</button>
				<view class="username" v-else>
					{{name.user}}
				</view>
			</view>
			<view class="Mineboxbottom">
				<view class="Mineboxbottombox">
					<view>
						<image src="../../static/images/raw_1516949643.png" mode=""></image>
						<view>
							待支付
						</view>
					</view>
					<view>
						<image src="../../static/images/raw_1516949705.png" mode=""></image>
						<view>
							待收货
						</view>
					</view>
					<view>
						<image src="../../static/images/raw_1516949816.png" mode=""></image>
						<view>
							待评价
						</view>
					</view>
					<view @click="allorder">
						<image src="../../static/images/raw_1516949870.png" mode=""></image>
						<view>
							全部订单
						</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 下面部分 -->
		<view class="boxbuttom">
			<view class="talentsboxbuttom">
				<view>
					<view class="issue border" @click="release">
						<view>
							<image src="../../static/images/raw_1516950680.png" mode=""></image>
							<view>
								我的发布
							</view>
						</view>
					</view>
					<view class="issue border">
						<view @click="collect">
							<image src="../../static/images/raw_1516950723.png" mode=""></image>
							<view>
								我的收藏
							</view>
						</view>
					</view>
					<view class="issue ">
						<view>
							<image src="../../static/images/raw_1516950753.png" mode=""></image>
							<view>
								浏览记录
							</view>
						</view>
					</view>

				</view>
				<view class="boxbottoms">
					<view class="border">
						<view class="issues">
							<image src="../../static/images/raw_1516950783.png" mode=""></image>
							<view class="">
								常用地址
							</view>
						</view>
					</view>
					<view class="border">
						<view class="">
							<view class="issues">
								<image src="../../static/images/raw_1516950838.png" mode=""></image>
								<view class="">
									联系客服
								</view>
							</view>
						</view>
					</view>
					<view>
						<view class="issues" @click="feedback">
							<image src="../../static/images/raw_1516950895.png" mode=""></image>
							<view class="">
								意见反馈
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</div>
</template>

<script>
	import {
		mapState
	} from 'vuex'
	export default {
		computed: {
			...mapState(['name'])
		},
	
		data() {
			return {
				islogin: false,
				namess:''
			}
		},
		methods: {
			// 登录
			logins() {
				uni.navigateTo({
					url: '../Login/index'
				})
			
			},
			// 全部订单
			allorder() {
				uni.navigateTo({
					url: "./allorder"
				})
			},
			// 意见反馈
			feedback() {
				uni.navigateTo({
					url: "feedback/index"
				})
			},
			// 跳转我的发布
			release() {
				uni.navigateTo({
					url: "./release/index"
				})
			},
			// 跳转订单	
			collect(){
				uni.navigateTo({
					url:'../collect/index'
				})
			}
		},
		mounted() {
			
			// if(localStorage.getItem('names')){
			// 	// var texts=localStorage.getItem('names')
			// 	// this.namess=texts
			// 	this.islogin=false
			// }else{
			// 	this.islogin=true
			// }
		
			
		},
	}
</script>

<style scoped>
	.username {
		text-align: center;
		line-height: 200px;
	}

	.logins {
		width: 100px;
		height: 50px;
		margin-top: 50px;
	}

	.Mineboxtop {
		height: 180px;
		background: #fff;
		border-bottom: 1px solid #919191;
		overflow: hidden;
	}

	.Mineboxbottom {
		height: 109px;
		background: #fff;
		font-size: 14px;
	}

	.Mineboxbottombox {
		display: flex;
		text-align: center;
		justify-content: center;
	}

	.Mineboxbottombox>view {
		width: 25%;
		margin-top: 20px;
	}

	.settings {
		color: #919191;
		font-size: 20px;
		float: left;
		margin-left: 10px;
	}

	.infohint {
		color: #919191;
		float: right;
		margin-right: 10px;
	}

	image {
		width: 50px;
		height: 50px;
	}


	.boxbuttom {
		margin-top: 10px;
		height: 241px;
		background: #fff;
	}


	.issues {
		margin-top: 20px;
	}

	.talentsboxbuttom>view {
		display: flex;
		text-align: center;
		flex-wrap: wrap;
		font-size: 14px;


	}

	.talentsboxbuttom>view>view {
		flex: 1;
		height: 117px;
		/* border-right: 1px solid #919191; */

	}

	.issue {
		border-bottom: 1px solid #919191;
	}

	.issue>view {
		margin-top: 20px;
	}

	.border {
		border-right: 1px solid #919191;
	}
</style>
